﻿using System;
using System.Data.SqlClient;
using Devv.Core.UniDataTier;

namespace Yglu.BusinessLayer.Reports
{
	public class PromotionUsage : BaseReport
	{
		#region Properties

		public String PromotionTitle { get; set; }
		public Int32 Count { get; set; }
		public String MostUsedInStoreTitle { get; set; }

		#endregion

		#region Constructor

		public PromotionUsage()
		{
		}

		public PromotionUsage(SqlDataReader reader)
		{
			Construct(reader);
		}

		#endregion

		#region Methods

		public override void Load(SqlDataReader reader)
		{
			DateGenerated = DateTime.Now;

			PromotionTitle = DataHandler.GetString(reader, "PromotionTitle");
			Count = DataHandler.GetInt32(reader, "UsageCount");
			MostUsedInStoreTitle = DataHandler.GetString(reader, "MostUsedInStoreTitle");
		}

		#endregion
	}
}